/*      */ package com.qmsk.business.member.member.controller;
/*      */ 
/*      */ import com.qmsk.business.manage.cust.dao.CustDAO;
/*      */ import com.qmsk.business.member.member.dao.MemberDAO;
/*      */ import com.qmsk.business.member.member.params.MemberOpt1;
/*      */ import com.qmsk.business.member.member.params.MemberState;
/*      */ import com.qmsk.business.member.memberLevel.dao.MemberLevelDAO;
/*      */ import com.qmsk.business.member.memberLog.dao.MemberLogDAO;
/*      */ import com.qmsk.business.member.memberServiceBill.dao.MemberServiceBillDAO;
/*      */ import com.qmsk.business.member.memberServiceBillDetail.dao.MemberServiceBillDetailDAO;
/*      */ import com.qmsk.business.member.memberServiceDetail.dao.MemberServiceDetailDAO;
/*      */ import com.qmsk.business.member.shopMember.dao.ShopMemberDAO;
/*      */ import com.qmsk.business.shopList.ShopMap;
/*      */ import com.qmsk.session.UserSessionInfo;
/*      */ import com.utils.basic.CDateTimeComm;
/*      */ import com.utils.basic.MapUtils;
/*      */ import com.utils.basic.ObjectComm;
/*      */ import com.utils.crypt.AESUtils;
/*      */ import com.utils.gson.in.GsonHeadOneRow;
/*      */ import com.utils.gson.out.GsonEbRst;
/*      */ import com.utils.gson.out.GsonEbRstLong;
/*      */ import com.utils.http.HttpGsonPtResponseUtils;
/*      */ import com.utils.http.HttpGsonPtUtils;
/*      */ import com.utils.jdbc.connection.DbConnection;
/*      */ import com.utils.web.RequestUtils;
/*      */ import com.utils.web.ResponseUtils;
/*      */ import java.sql.SQLException;
/*      */ import java.util.Date;
/*      */ import java.util.HashMap;
/*      */ import java.util.Map;
/*      */ import javax.servlet.http.HttpServletRequest;
/*      */ import javax.servlet.http.HttpServletResponse;
/*      */ import org.apache.log4j.Logger;
/*      */ import org.springframework.beans.factory.annotation.Autowired;
/*      */ import org.springframework.stereotype.Controller;
/*      */ import org.springframework.transaction.annotation.Transactional;
/*      */ import org.springframework.web.bind.annotation.PathVariable;
/*      */ import org.springframework.web.bind.annotation.RequestMapping;
/*      */ 
/*      */ @Controller
/*      */ @RequestMapping({"/member"})
/*      */ public class MemberController
/*      */ {
/*   54 */   private static final Logger logger = Logger.getLogger(MemberController.class);
/*      */ 
/*      */   @Autowired
/*      */   private MemberDAO dao;
/*      */ 
/*      */   @Autowired
/*      */   private ShopMemberDAO shopMemberDAO;
/*      */ 
/*      */   @Autowired
/*      */   private MemberServiceBillDAO memberServiceBillDAO;
/*      */ 
/*      */   @Autowired
/*      */   private MemberServiceBillDetailDAO memberServiceBillDetailDAO;
/*      */ 
/*      */   @Autowired
/*      */   private MemberServiceDetailDAO memberServiceDetailDAO;
/*      */ 
/*      */   @Autowired
/*      */   private MemberLogDAO memberLogDAO;
/*      */ 
/*      */   @Autowired
/*      */   private MemberLevelDAO memberLeveldao;
/*      */ 
/*      */   @Autowired
/*      */   private CustDAO custDAO;
/*      */ 
/*      */   @RequestMapping(value={"find/integralWeeKRank/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getIntegralWeekRankList(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*   94 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*   96 */       GsonEbRst gsonEbRst = this.dao.getIntegralWeekRankList(shopId, nPageIdx, 
/*   97 */         nPageSize);
/*   98 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  100 */       logger.error(e);
/*  101 */       ResponseUtils.setErrorMsgResponse(
/*  102 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/integralRank/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getIntegralRankList(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  112 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  114 */       GsonEbRst gsonEbRst = this.dao.getIntegralRankList(shopId, nPageIdx, 
/*  115 */         nPageSize);
/*  116 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  118 */       logger.error(e);
/*  119 */       ResponseUtils.setErrorMsgResponse(
/*  120 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/customerintegralRank/{shopId}/{openId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getIntegralRankList(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId, @PathVariable("openId") String openId)
/*      */   {
/*      */     try
/*      */     {
/*  130 */       GsonEbRst gsonEbRst = this.dao.getCustomerIntegralRank(shopId, openId);
/*  131 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  133 */       logger.error(e);
/*  134 */       ResponseUtils.setErrorMsgResponse(
/*  135 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/custId/{custId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopIdCustId(HttpServletRequest request, HttpServletResponse response, @PathVariable("custId") Long custId, @PathVariable("shopId") Long shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  178 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  180 */       GsonEbRst gsonEbRst = this.dao.getGsonOfCustId(custId, shopId, nPageIdx, 
/*  181 */         nPageSize);
/*  182 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  184 */       logger.error(e);
/*  185 */       ResponseUtils.setErrorMsgResponse(
/*  186 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/openId/{openId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopIdMemberId(HttpServletRequest request, HttpServletResponse response, @PathVariable("openId") String openId, @PathVariable("shopId") Long shopId)
/*      */   {
/*      */     try
/*      */     {
/*  203 */       GsonEbRst gsonEbRst = this.shopMemberDAO.getGsonOfShopIdAndOpenId(
/*  204 */         openId, shopId);
/*  205 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  207 */       logger.error(e);
/*  208 */       ResponseUtils.setErrorMsgResponse(
/*  209 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/memberCardInfo/{shopId}/{openId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getMemberCardInfoByShopIdAndOpenId(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId, @PathVariable("openId") String openId)
/*      */   {
/*      */     try
/*      */     {
/*  230 */       if (!(this.custDAO.getIsMemberOfCust(shopId, openId))) {
/*  231 */         ResponseUtils.setErrorMsgResponse("您还不是会员！", response);
/*  232 */         return;
/*      */       }
/*  234 */       GsonEbRst gsonEbRst = this.shopMemberDAO
/*  235 */         .getMemberCardInfoByShopIdAndOpenId(shopId, openId);
/*  236 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/*  238 */       logger.error(e);
/*  239 */       ResponseUtils.setErrorMsgResponse(
/*  240 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/mini/custId/{custId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfCustIdMini(@PathVariable("custId") Long custId, HttpServletRequest request, HttpServletResponse response)
/*      */   {
/*      */     try
/*      */     {
/*  256 */       GsonEbRst gsonEbRst = this.dao.getGsonOfCustIdMini(custId);
/*  257 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  259 */       logger.error(e);
/*  260 */       ResponseUtils.setErrorMsgResponse(
/*  261 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/custId/buss/{custId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfCustIdBuss(HttpServletRequest request, HttpServletResponse response, @PathVariable("custId") Long custId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  277 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  279 */       GsonEbRst gsonEbRst = this.dao.getGsonOfFindCustId(custId, nPageIdx, 
/*  280 */         nPageSize);
/*  281 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  283 */       logger.error(e);
/*  284 */       ResponseUtils.setErrorMsgResponse(
/*  285 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/wxIntegra"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getWxIntegralInfo(HttpServletRequest request, HttpServletResponse response)
/*      */   {
/*      */     try
/*      */     {
/*  300 */       String openId = RequestUtils.getString(request, "openId");
/*  301 */       Long shopId = RequestUtils.getLong(request, "shopId");
/*  302 */       GsonEbRst gsonEbRst = this.dao.getWxMemberInfo(openId, shopId);
/*  303 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  305 */       logger.error(e);
/*  306 */       ResponseUtils.setErrorMsgResponse(
/*  307 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"/find/shopId/{shopId}/attach/custId/{custId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfCustIdAttach(HttpServletRequest request, HttpServletResponse response, @PathVariable("custId") Long custId)
/*      */   {
/*      */     try
/*      */     {
/*  322 */       GsonEbRst gsonEbRst = this.dao.getGsonOfFindCustId(custId);
/*  323 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  325 */       logger.error(e);
/*  326 */       ResponseUtils.setErrorMsgResponse(
/*  327 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/memberId/buss/{memberId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberIdBuss(HttpServletRequest request, HttpServletResponse response, @PathVariable("memberId") Long memberId)
/*      */   {
/*      */     try
/*      */     {
/*  368 */       GsonEbRst gsonEbRst = this.dao.getGsonOfMemberIdBuss(memberId);
/*  369 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  371 */       logger.error(e);
/*  372 */       ResponseUtils.setErrorMsgResponse(
/*  373 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/attach/memberId/{memberId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberIdAttach(HttpServletRequest request, HttpServletResponse response, @PathVariable("memberId") Long memberId)
/*      */   {
/*      */     try
/*      */     {
/*  389 */       GsonEbRst gsonEbRst = this.dao.getGsonOfMemberIdAttach(memberId);
/*  390 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  392 */       logger.error(e);
/*  393 */       ResponseUtils.setErrorMsgResponse(
/*  394 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/custInfo/memberId/{memberId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberIdCustInfo(HttpServletRequest request, HttpServletResponse response, @PathVariable("memberId") Long memberId, @PathVariable("shopId") Long shopId)
/*      */   {
/*      */     try
/*      */     {
/*  404 */       GsonEbRst gsonEbRst = null;
/*  405 */       if (ShopMap.getShareMemberOfShopId(shopId).booleanValue()) {
/*  406 */         Long groupId = ShopMap.getGroupIdOfShopId(shopId);
/*  407 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo(null, memberId, null, 
/*  408 */           null, groupId);
/*      */       } else {
/*  410 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo(shopId, memberId, 
/*  411 */           null, null, null);
/*      */       }
/*  413 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  415 */       logger.error(e);
/*  416 */       ResponseUtils.setErrorMsgResponse(
/*  417 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/custInfo/cardNo/{cardNo}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfCustIdCustInfo(HttpServletRequest request, HttpServletResponse response, @PathVariable("cardNo") String cardNo, @PathVariable("shopId") Long shopId)
/*      */   {
/*      */     try
/*      */     {
/*  427 */       GsonEbRst gsonEbRst = null;
/*  428 */       if (ShopMap.getShareMemberOfShopId(shopId).booleanValue()) {
/*  429 */         Long groupId = ShopMap.getGroupIdOfShopId(shopId);
/*  430 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo(null, null, null, 
/*  431 */           cardNo, groupId);
/*      */       } else {
/*  433 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo(shopId, null, null, 
/*  434 */           cardNo, null);
/*      */       }
/*  436 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  438 */       logger.error(e);
/*  439 */       ResponseUtils.setErrorMsgResponse(
/*  440 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/custInfo/outId/{outId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfOutMIdCustInfo(HttpServletRequest request, HttpServletResponse response, @PathVariable("outId") Long outId, @PathVariable("shopId") Long shopId)
/*      */   {
/*      */     try
/*      */     {
/*  449 */       GsonEbRst gsonEbRst = null;
/*  450 */       if (ShopMap.getShareMemberOfShopId(shopId).booleanValue()) {
/*  451 */         Long groupId = ShopMap.getGroupIdOfShopId(shopId);
/*  452 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo(null, null, outId, 
/*  453 */           null, groupId);
/*      */       } else {
/*  455 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo(shopId, null, outId, 
/*  456 */           null, null);
/*      */       }
/*  458 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  460 */       logger.error(e);
/*  461 */       ResponseUtils.setErrorMsgResponse(
/*  462 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/custInfo1/outId/{outId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfOutIdCustInfo1(HttpServletRequest request, HttpServletResponse response, @PathVariable("outId") Long outId, @PathVariable("shopId") Long shopId)
/*      */   {
/*      */     try
/*      */     {
/*  472 */       GsonEbRst gsonEbRst = null;
/*  473 */       if (ShopMap.getShareMemberOfShopId(shopId).booleanValue()) {
/*  474 */         Long groupId = ShopMap.getGroupIdOfShopId(shopId);
/*  475 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo1(null, null, outId, 
/*  476 */           null, groupId);
/*      */       } else {
/*  478 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo1(shopId, null, outId, 
/*  479 */           null, null);
/*      */       }
/*  481 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  483 */       logger.error(e);
/*  484 */       ResponseUtils.setErrorMsgResponse(
/*  485 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/custInfo1/memberId/{memberId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberIdCustInfo1(HttpServletRequest request, HttpServletResponse response, @PathVariable("memberId") Long memberId, @PathVariable("shopId") Long shopId)
/*      */   {
/*      */     try
/*      */     {
/*  495 */       GsonEbRst gsonEbRst = null;
/*  496 */       if (ShopMap.getShareMemberOfShopId(shopId).booleanValue()) {
/*  497 */         Long groupId = ShopMap.getGroupIdOfShopId(shopId);
/*  498 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo1(null, memberId, 
/*  499 */           null, null, groupId);
/*      */       } else {
/*  501 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo1(shopId, memberId, 
/*  502 */           null, null, null);
/*      */       }
/*  504 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  506 */       logger.error(e);
/*  507 */       ResponseUtils.setErrorMsgResponse(
/*  508 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/custInfo1/cardNo/{cardNo}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfCardNoCustInfo1(HttpServletRequest request, HttpServletResponse response, @PathVariable("cardNo") String cardNo, @PathVariable("shopId") Long shopId)
/*      */   {
/*      */     try
/*      */     {
/*  518 */       GsonEbRst gsonEbRst = null;
/*  519 */       if (ShopMap.getShareMemberOfShopId(shopId).booleanValue()) {
/*  520 */         Long groupId = ShopMap.getGroupIdOfShopId(shopId);
/*  521 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo1(null, null, null, 
/*  522 */           cardNo, groupId);
/*      */       } else {
/*  524 */         gsonEbRst = this.dao.getGsonOfMemberIdCustInfo1(shopId, null, null, 
/*  525 */           cardNo, null);
/*      */       }
/*  527 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  529 */       logger.error(e);
/*  530 */       ResponseUtils.setErrorMsgResponse(
/*  531 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/attach/outId/{outId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfOutIdAttach(HttpServletRequest request, HttpServletResponse response, @PathVariable("outId") Long outId)
/*      */   {
/*      */     try
/*      */     {
/*  546 */       GsonEbRst gsonEbRst = this.dao.getGsonOfOutIdAttach(outId);
/*  547 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  549 */       logger.error(e);
/*  550 */       ResponseUtils.setErrorMsgResponse(
/*  551 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/cardNo/buss/{cardNo}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberIdBuss(HttpServletRequest request, HttpServletResponse response, @PathVariable("cardNo") String cardNo)
/*      */   {
/*      */     try
/*      */     {
/*  566 */       GsonEbRst gsonEbRst = this.dao.getGsonOfCardNoBuss(cardNo);
/*  567 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  569 */       logger.error(e);
/*  570 */       ResponseUtils.setErrorMsgResponse(
/*  571 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/outId/buss/{outId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberOutId(HttpServletRequest request, HttpServletResponse response, @PathVariable("outId") Long outId)
/*      */   {
/*      */     try
/*      */     {
/*  586 */       GsonEbRst gsonEbRst = this.dao.getGsonMemberOutId(outId);
/*  587 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  589 */       logger.error(e);
/*  590 */       ResponseUtils.setErrorMsgResponse(
/*  591 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/attach/cardNo/{cardNo}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberIdAttach(HttpServletRequest request, HttpServletResponse response, @PathVariable("cardNo") String cardNo, @PathVariable("shopId") Long shopId)
/*      */   {
/*      */     try
/*      */     {
/*  608 */       Map params = new HashMap();
/*  609 */       params.put("cardNo", cardNo);
/*  610 */       if (ShopMap.getShareMemberOfShopId(shopId).booleanValue())
/*  611 */         params.put("groupId", ShopMap.getGroupIdOfShopId(shopId));
/*      */       else {
/*  613 */         params.put("shopId", shopId);
/*      */       }
/*  615 */       GsonEbRst gsonEbRst = this.dao.getGsonOfCardNoAttach(params);
/*  616 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  618 */       logger.error(e);
/*  619 */       ResponseUtils.setErrorMsgResponse(
/*  620 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/vcard/cardNo/{cardNo}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfCardNoOfViceCard(HttpServletRequest request, HttpServletResponse response, @PathVariable("cardNo") String cardNo, @PathVariable("shopId") Long shopId)
/*      */   {
/*      */     try
/*      */     {
/*  637 */       Map params = new HashMap();
/*  638 */       params.put("cardNo", cardNo);
/*  639 */       if (ShopMap.getShareMemberOfShopId(shopId).booleanValue())
/*  640 */         params.put("groupId", ShopMap.getGroupIdOfShopId(shopId));
/*      */       else {
/*  642 */         params.put("shopId", shopId);
/*      */       }
/*  644 */       GsonEbRst gsonEbRst = this.dao.getGsonOfMemberOfVCard(params);
/*  645 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  647 */       logger.error(e);
/*  648 */       ResponseUtils.setErrorMsgResponse(
/*  649 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/vcard/outId/{outId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberIdOfViceCard(HttpServletRequest request, HttpServletResponse response, @PathVariable("outId") Long outId)
/*      */   {
/*      */     try
/*      */     {
/*  664 */       Map params = new HashMap();
/*  665 */       params.put("outId", outId);
/*  666 */       GsonEbRst gsonEbRst = this.dao.getGsonOfMemberOfVCard(params);
/*  667 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/*  669 */       logger.error(e);
/*  670 */       ResponseUtils.setErrorMsgResponse(
/*  671 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/custId/mini/{shopId}/{custId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfCustIdShopIdMini(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Integer shopId, @PathVariable("custId") Long custId)
/*      */   {
/*      */     try
/*      */     {
/*  687 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdCustIdMini(shopId, custId);
/*  688 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/*  690 */       logger.error(e);
/*  691 */       ResponseUtils.setErrorMsgResponse(
/*  692 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/normal/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopId_Normal(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Integer shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  708 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  710 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(null, shopId, 
/*  711 */         Integer.valueOf(2), nPageIdx, nPageSize);
/*  712 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/*  714 */       logger.error(e);
/*  715 */       ResponseUtils.setErrorMsgResponse(
/*  716 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/preSale/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopId_PreSale(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Integer shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  732 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  734 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(null, shopId, 
/*  735 */         Integer.valueOf(1), nPageIdx, nPageSize);
/*  736 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/*  738 */       logger.error(e);
/*  739 */       ResponseUtils.setErrorMsgResponse(
/*  740 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/outoff/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopId_Outoff(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Integer shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  756 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  758 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(null, shopId, 
/*  759 */         Integer.valueOf(7), nPageIdx, nPageSize);
/*  760 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/*  762 */       logger.error(e);
/*  763 */       ResponseUtils.setErrorMsgResponse(
/*  764 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/reSale/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopId_ReSale(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Integer shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  780 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  782 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(null, shopId, 
/*  783 */         Integer.valueOf(3), nPageIdx, nPageSize);
/*  784 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/*  786 */       logger.error(e);
/*  787 */       ResponseUtils.setErrorMsgResponse(
/*  788 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/lost/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopId_Lost(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Integer shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  804 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  806 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(null, shopId, 
/*  807 */         Integer.valueOf(4), nPageIdx, nPageSize);
/*  808 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/*  810 */       logger.error(e);
/*  811 */       ResponseUtils.setErrorMsgResponse(
/*  812 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/bad/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopId_Bad(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Integer shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  828 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  830 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(null, shopId, 
/*  831 */         Integer.valueOf(5), nPageIdx, nPageSize);
/*  832 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/*  834 */       logger.error(e);
/*  835 */       ResponseUtils.setErrorMsgResponse(
/*  836 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/upgrade/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopId_Upgrade(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Integer shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/*  852 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/*  854 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(null, shopId, 
/*  855 */         Integer.valueOf(6), nPageIdx, nPageSize);
/*  856 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/*  858 */       logger.error(e);
/*  859 */       ResponseUtils.setErrorMsgResponse(
/*  860 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/cardNo/{cardNo}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getMemberIdOfCardNo(HttpServletRequest request, HttpServletResponse response, @PathVariable("cardNo") String cardNo)
/*      */   {
/*      */     try
/*      */     {
/*  874 */       Long id = this.dao.getGsonOfCardNo(cardNo);
/*  875 */       ResponseUtils.setResponseResult(id, response);
/*      */     } catch (Exception e) {
/*  877 */       logger.error(e);
/*  878 */       ResponseUtils.setErrorMsgResponse(
/*  879 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   private int saveAfter(Long lMemberId, Integer validDay, Long shopId, Long groupId, String createFileMan, String serviceMan, Object LevelID, Date greatTime, Date validayTime, boolean bDeleteHis, String memo)
/*      */     throws SQLException
/*      */   {
/*  923 */     int nResult = 0;
/*      */ 
/*  925 */     Object[] shopMembeParams = { lMemberId, shopId, Boolean.valueOf(true), 
/*  926 */       groupId };
/*      */ 
/*  928 */     if ((this.shopMemberDAO.insertParams(shopMembeParams).intValue() > 0) && 
/*  929 */       (this.memberServiceBillDAO.insertBill(lMemberId, createFileMan, 
/*  930 */       serviceMan, shopId, memo).intValue() > 0))
/*      */     {
/*  931 */       Long billId = this.memberServiceBillDAO.getLastId();
/*  932 */       this.memberServiceBillDetailDAO.insertBillDetail(lMemberId, billId, 
/*  933 */         LevelID, shopId);
/*  934 */       this.memberServiceDetailDAO.insertDetail(validDay, greatTime, 
/*  935 */         validayTime, lMemberId, shopId, LevelID, bDeleteHis);
/*  936 */       nResult = 1;
/*      */     }
/*      */ 
/*  939 */     return nResult;
/*      */   }
/*      */ 
/*      */   private int updateResaleAfter(Long lMemberId, Integer validDay, Long shopId, String createFileMan, String serviceMan, Object LevelID, Date greatTime, Date validayTime, boolean bDeleteHis)
/*      */     throws SQLException
/*      */   {
/*  958 */     int nResult = 0;
/*  959 */     if (this.memberServiceBillDAO.insertBill(lMemberId, createFileMan, 
/*  960 */       serviceMan, shopId, "").intValue() > 0)
/*      */     {
/*  961 */       Long billId = this.memberServiceBillDAO.getLastId();
/*  962 */       this.memberServiceBillDetailDAO.insertBillDetail(lMemberId, billId, 
/*  963 */         LevelID, shopId);
/*      */ 
/*  965 */       this.memberServiceDetailDAO.deleteDetail(lMemberId, shopId);
/*  966 */       this.memberServiceDetailDAO.insertDetail(validDay, greatTime, 
/*  967 */         validayTime, lMemberId, shopId, LevelID, bDeleteHis);
/*  968 */       nResult = 1;
/*      */     }
/*  970 */     return nResult;
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/custId/license/{shopId}/{custId}/{license}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void findShopIdCustIdLicense(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId, @PathVariable("custId") String custId, @PathVariable("license") String license)
/*      */     throws SQLException
/*      */   {
/*  978 */     boolean existsCustIdShopId = this.shopMemberDAO.isExistsOfShopIdLicense(
/*  979 */       shopId, license);
/*  980 */     ResponseUtils.setResponseResult(existsCustIdShopId, response);
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/groupId/custId/license/{groupId}/{custId}/{license}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void findGroupIdCustIdLicense(HttpServletRequest request, HttpServletResponse response, @PathVariable("groupId") Long groupId, @PathVariable("custId") String custId, @PathVariable("license") String license)
/*      */     throws SQLException
/*      */   {
/*  989 */     boolean existsCustIdShopId = this.shopMemberDAO.isExistsOfGroupIdLicense(
/*  990 */       groupId, license);
/*  991 */     ResponseUtils.setResponseResult(existsCustIdShopId, response);
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/mber/amtofInt"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getMberAmtofInt(HttpServletRequest request, HttpServletResponse response) throws SQLException
/*      */   {
/*  997 */     MemberOpt1 m = new MemberOpt1();
/*  998 */     m.setShopId(RequestUtils.getInt(request, "shopId"));
/*  999 */     m.setLicense(RequestUtils.getString(request, "license"));
/* 1000 */     m.setCustName(RequestUtils.getString(request, "custName"));
/* 1001 */     m.setMp(RequestUtils.getString(request, "mp"));
/* 1002 */     m.setTel(RequestUtils.getString(request, "tel"));
/* 1003 */     m.setLevelId(RequestUtils.getInt(request, "levelId"));
/* 1004 */     m.setAmtBegin(RequestUtils.getInt(request, "intAmtBegin"));
/* 1005 */     m.setAmtEnd(RequestUtils.getInt(request, "intAmtEnd"));
/* 1006 */     m.setWashCountBegin(RequestUtils.getInt(request, "washCountBegin"));
/* 1007 */     m.setWashCountEnd(RequestUtils.getInt(request, "washCountEnd"));
/* 1008 */     m.setDtBegin(RequestUtils.getDate(request, "dtBegin"));
/* 1009 */     m.setDtEnd(RequestUtils.getDate(request, "dtEnd"));
/*      */     try
/*      */     {
/* 1012 */       GsonEbRst gsonEbRst = this.dao.getMberAmtofInt(m.getMapList());
/* 1013 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/* 1015 */       logger.error(e);
/* 1016 */       ResponseUtils.setErrorMsgResponse(
/* 1017 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/opt1/sum"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfOpt1Sum(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId1)
/*      */     throws SQLException
/*      */   {
/* 1076 */     Map params = new HashMap();
/*      */ 
/* 1080 */     Long shopId2 = RequestUtils.getLong(request, "shopId");
/* 1081 */     if (shopId2 == null)
/* 1082 */       MapUtils.addToMap(params, "groupId", 
/* 1083 */         ShopMap.getGroupIdOfShopId(shopId1));
/*      */     else {
/* 1085 */       MapUtils.addToMap(params, "shopId", shopId2);
/*      */     }
/* 1087 */     MapUtils.addPercentToMap(params, "license", 
/* 1088 */       RequestUtils.getString(request, "license"));
/* 1089 */     MapUtils.addPercentToMap(params, "custName", 
/* 1090 */       RequestUtils.getString(request, "custName"));
/* 1091 */     MapUtils.addPercentToMap(params, "mp", 
/* 1092 */       RequestUtils.getString(request, "mp"));
/* 1093 */     MapUtils.addPercentToMap(params, "tel", 
/* 1094 */       RequestUtils.getString(request, "tel"));
/* 1095 */     MapUtils.addPercentToMap(params, "cardNo", 
/* 1096 */       RequestUtils.getString(request, "cardNo"));
/* 1097 */     MapUtils.addToMap(params, "levelId", 
/* 1098 */       RequestUtils.getInt(request, "levelId"));
/* 1099 */     MapUtils.addToMap(params, "intAmtBegin", 
/* 1100 */       RequestUtils.getInt(request, "intAmtBegin"));
/* 1101 */     MapUtils.addToMap(params, "intAmtEnd", 
/* 1102 */       RequestUtils.getInt(request, "intAmtEnd"));
/* 1103 */     MapUtils.addToMap(params, "washCountBegin", 
/* 1104 */       RequestUtils.getInt(request, "washCountBegin"));
/* 1105 */     MapUtils.addToMap(params, "washCountEnd", 
/* 1106 */       RequestUtils.getInt(request, "washCountEnd"));
/* 1107 */     MapUtils.addToMap(params, "dtBegin", 
/* 1108 */       RequestUtils.getDate(request, "dtBegin"));
/* 1109 */     MapUtils.addToMap(params, "dtEnd", 
/* 1110 */       RequestUtils.getDate(request, "dtEnd"));
/* 1111 */     MapUtils.addToMap(params, "status", 
/* 1112 */       RequestUtils.getInt(request, "status"));
/* 1113 */     MapUtils.addToMap(params, "memberId", 
/* 1114 */       RequestUtils.getString(request, "memberId"));
/* 1115 */     MapUtils.addToMap(params, "cashConpBegin", 
/* 1116 */       RequestUtils.getDouble(request, "cashConpBegin"));
/* 1117 */     MapUtils.addToMap(params, "cashConpEnd", 
/* 1118 */       RequestUtils.getDouble(request, "cashConpEnd"));
/* 1119 */     MapUtils.addToMap(params, "depositBegin", 
/* 1120 */       RequestUtils.getDouble(request, "depositBegin"));
/* 1121 */     MapUtils.addToMap(params, "depositEnd", 
/* 1122 */       RequestUtils.getDouble(request, "depositEnd"));
/* 1123 */     MapUtils.addToMap(params, "disctConpBegin", 
/* 1124 */       RequestUtils.getDouble(request, "disctConpBegin"));
/* 1125 */     MapUtils.addToMap(params, "disctConpEnd", 
/* 1126 */       RequestUtils.getDouble(request, "disctConpEnd"));
/*      */     try {
/* 1128 */       GsonEbRst gsonEbRst = this.dao.getListOfSumShopId(params);
/* 1129 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/* 1131 */       logger.error(e);
/* 1132 */       ResponseUtils.setErrorMsgResponse(
/* 1133 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/memberId/{id}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberId(HttpServletRequest request, HttpServletResponse response, @PathVariable("id") Object id)
/*      */     throws SQLException
/*      */   {
/* 1147 */     MemberOpt1 m = new MemberOpt1();
/* 1148 */     m.setShopId(RequestUtils.getInt(request, "shopId"));
/* 1149 */     m.setMemberId(id);
/*      */     try {
/* 1151 */       GsonEbRst gsonEbRst = this.dao.getListOfShopIdOpt1(m.getMemberMapList(), 
/* 1152 */         Integer.valueOf(0), Short.valueOf((short) 10));
/* 1153 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/* 1155 */       logger.error(e);
/* 1156 */       ResponseUtils.setErrorMsgResponse(
/* 1157 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/opt1/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfShopIdOpt1(HttpServletRequest request, HttpServletResponse response, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize, @PathVariable("shopId") Long shopId1)
/*      */     throws SQLException
/*      */   {
/* 1173 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/* 1174 */     Map params = new HashMap();
/* 1175 */     Long shopId2 = RequestUtils.getLong(request, "shopId");
/* 1176 */     if (shopId2 == null)
/* 1177 */       MapUtils.addToMap(params, "groupId", 
/* 1178 */         ShopMap.getGroupIdOfShopId(shopId1));
/*      */     else {
/* 1180 */       MapUtils.addToMap(params, "shopId", shopId2);
/*      */     }
/*      */ 
/* 1189 */     MapUtils.addPercentToMap(params, "license", 
/* 1190 */       RequestUtils.getString(request, "license"));
/* 1191 */     MapUtils.addPercentToMap(params, "custName", 
/* 1192 */       RequestUtils.getString(request, "custName"));
/* 1193 */     MapUtils.addPercentToMap(params, "mp", 
/* 1194 */       RequestUtils.getString(request, "mp"));
/* 1195 */     MapUtils.addPercentToMap(params, "tel", 
/* 1196 */       RequestUtils.getString(request, "tel"));
/* 1197 */     MapUtils.addPercentToMap(params, "cardNo", 
/* 1198 */       RequestUtils.getString(request, "cardNo"));
/* 1199 */     MapUtils.addToMap(params, "levelId", 
/* 1200 */       RequestUtils.getInt(request, "levelId"));
/* 1201 */     MapUtils.addToMap(params, "intAmtBegin", 
/* 1202 */       RequestUtils.getInt(request, "intAmtBegin"));
/* 1203 */     MapUtils.addToMap(params, "intAmtEnd", 
/* 1204 */       RequestUtils.getInt(request, "intAmtEnd"));
/* 1205 */     MapUtils.addToMap(params, "washCountBegin", 
/* 1206 */       RequestUtils.getInt(request, "washCountBegin"));
/* 1207 */     MapUtils.addToMap(params, "washCountEnd", 
/* 1208 */       RequestUtils.getInt(request, "washCountEnd"));
/* 1209 */     MapUtils.addToMap(params, "dtBegin", 
/* 1210 */       RequestUtils.getDate(request, "dtBegin"));
/* 1211 */     MapUtils.addToMap(params, "dtEnd", 
/* 1212 */       RequestUtils.getDate(request, "dtEnd"));
/* 1213 */     MapUtils.addToMap(params, "status", 
/* 1214 */       RequestUtils.getInt(request, "status"));
/* 1215 */     MapUtils.addToMap(params, "memberId", 
/* 1216 */       RequestUtils.getString(request, "memberId"));
/* 1217 */     MapUtils.addToMap(params, "cashConpBegin", 
/* 1218 */       RequestUtils.getDouble(request, "cashConpBegin"));
/* 1219 */     MapUtils.addToMap(params, "cashConpEnd", 
/* 1220 */       RequestUtils.getDouble(request, "cashConpEnd"));
/* 1221 */     MapUtils.addToMap(params, "depositBegin", 
/* 1222 */       RequestUtils.getDouble(request, "depositBegin"));
/* 1223 */     MapUtils.addToMap(params, "depositEnd", 
/* 1224 */       RequestUtils.getDouble(request, "depositEnd"));
/* 1225 */     MapUtils.addToMap(params, "disctConpBegin", 
/* 1226 */       RequestUtils.getDouble(request, "disctConpBegin"));
/* 1227 */     MapUtils.addToMap(params, "disctConpEnd", 
/* 1228 */       RequestUtils.getDouble(request, "disctConpEnd"));
/*      */     try {
/* 1230 */       GsonEbRst gsonEbRst = this.dao.getListOfShopIdOpt1(params, nPageIdx, 
/* 1231 */         nPageSize);
/* 1232 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/* 1234 */       logger.error(e);
/* 1235 */       ResponseUtils.setErrorMsgResponse(
/* 1236 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   private Long getMemberIdPtLong(HttpServletRequest request, HttpServletResponse response, String sGsonInData, Long shopId, Long groupId)
/*      */     throws Exception
/*      */   {
/* 1243 */     GsonHeadOneRow gs = GsonHeadOneRow.jsonStrToObject(sGsonInData);
/* 1244 */     GsonEbRstLong rst = null;
/* 1245 */     if (gs != null) {
/* 1246 */       String[] delHead = { "OperatorID", "ValidDateTime", 
/* 1247 */         "MemberMemo", "SaleId", "MemberFee", "Modified" };
/* 1248 */       gs.delHead(delHead);
/* 1249 */       if (gs.getDataLength() > 0) {
/* 1250 */         Integer status = (Integer)gs.getValueOfName("Status");
/* 1251 */         if (status != null) {
/* 1252 */           String nStatus = MemberState.getState(status);
/* 1253 */           gs.setValueOfName("Status", nStatus);
/*      */         }
/* 1255 */         String sSendToPt = gs.objectToJsonStr();
/* 1256 */         String sData = "data=" + sSendToPt + "&" + 
/* 1257 */           "shopId" + "=" + shopId + "&" + "groupId" + "=" + 
/* 1258 */           groupId;
/* 1259 */         String sUrl = "ptmember/insert";
/* 1260 */         rst = HttpGsonPtUtils.getEbRstLong(sUrl, sData, response);
/*      */       }
/* 1262 */       if (rst != null) {
/* 1263 */         return rst.getResult();
/*      */       }
/* 1265 */       return null;
/*      */     }
/*      */ 
/* 1268 */     ResponseUtils.setErrorMsgResponse("获取Crm信息失败", response);
/* 1269 */     return null;
/*      */   }
/*      */ 
/*      */   @Transactional
/*      */   @RequestMapping(value={"insert"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
/*      */   public void insert(HttpServletRequest request, HttpServletResponse response)
/*      */     throws Exception
/*      */   {
/* 1287 */     Long shopId = RequestUtils.getLong(request, "shopId");
/*      */ 
/* 1289 */     if (shopId == null) {
/* 1290 */       ResponseUtils.setErrorMsgResponse("ShopId不能为空", response);
/* 1291 */       return;
/*      */     }
/* 1293 */     Long groupId = RequestUtils.getLong(request, "groupId");
/* 1294 */     Long lMemberId = Long.valueOf(0L);
/* 1295 */     String sGsonInData = RequestUtils.getString(request, "data");
/* 1296 */     GsonHeadOneRow g = GsonHeadOneRow.jsonStrToObject(sGsonInData);
/* 1297 */     if (g == null)
/*      */     {
/* 1299 */       ResponseUtils.setErrorMsgResponse(
/* 1300 */         RequestUtils.getReadJsonDataErrorMessage(request), 
/* 1301 */         response);
/* 1302 */       return;
/*      */     }
/* 1304 */     Short bShareMember = RequestUtils.getShort(request, "shareMember");
/* 1305 */     String createFileMan = UserSessionInfo.getUserNameOfRequest(request);
/* 1306 */     String serviceMan = RequestUtils.getString(request, "serviceMan");
/* 1307 */     int nResult = 0;
/* 1308 */     Date greatTime = null;
/* 1309 */     Date validDateTmie = null;
/*      */     try {
/* 1311 */       Long levelID = ObjectComm.objectToLong(g.getValueOfName("LevelId"), 
/* 1312 */         Long.valueOf(0L));
/* 1313 */       Integer validDay = Integer.valueOf(0);
/* 1314 */       if ((levelID != null) && (levelID.longValue() > 0L)) {
/* 1315 */         validDay = Integer.valueOf(this.memberLeveldao.getValidDay(shopId, levelID));
/* 1316 */         if (validDay.intValue() <= 0)
/* 1317 */           g.autoAddHeadData("ValidDateTime", 
/* 1318 */             CDateTimeComm.getAddYear(new Date(), 100));
/*      */         else {
/* 1320 */           g.autoAddHeadData("ValidDateTime", 
/* 1321 */             CDateTimeComm.getAddDate(new Date(), validDay.intValue()));
/*      */         }
/*      */       }
/*      */ 
/* 1325 */       g.autoAddHeadData("CreateFileTime", new Date());
/* 1326 */       g.encryptHead("payPwd");
/* 1327 */       greatTime = (Date)g.getValueOfName("CreateFileTime");
/* 1328 */       validDateTmie = (Date)g.getValueOfName("ValidDateTime");
/*      */ 
/* 1330 */       String custId = (String)g.getValueOfName("custId");
/* 1331 */       String license = (String)g.getValueOfName("license");
/* 1332 */       Object memberCardNo = g.getValueOfName("MemberCardNo");
/* 1333 */       if ((memberCardNo != null) && (memberCardNo != "")) {
/* 1334 */         int count = this.dao.getCardNoIsExsit(memberCardNo, shopId);
/* 1335 */         if (count >= 1) {
/* 1336 */           ResponseUtils.setErrorMsgResponse("已有相同的会员卡号", response);
/* 1337 */           return;
/*      */         }
/*      */       }
/*      */       boolean existsCustIdShopId;
/* 1341 */       if (bShareMember.shortValue() == 0) {
/* 1342 */         lMemberId = this.shopMemberDAO.getMemberIdOfShopIdLicense(shopId, 
/* 1343 */           license);
/* 1344 */         if ((lMemberId == null) || (lMemberId.longValue() <= 0L)) {
/* 1345 */           lMemberId = getMemberIdPtLong(request, response, 
/* 1346 */             sGsonInData, shopId, groupId);
/* 1347 */           if ((lMemberId != null) && (lMemberId.longValue() > 0L) && 
/* 1348 */             (this.dao.insertGsonHeadOneRow(g, lMemberId) > 0))
/* 1349 */             nResult = saveAfter(lMemberId, validDay, shopId, 
/* 1350 */               groupId, createFileMan, serviceMan, 
/* 1351 */               levelID, greatTime, validDateTmie, true, "");
/*      */         }
/*      */         else
/*      */         {
/* 1355 */           existsCustIdShopId = this.shopMemberDAO
/* 1356 */             .isExistsOfShopIdLicense(shopId, license);
/* 1357 */           if (existsCustIdShopId) {
/* 1358 */             DbConnection.rollback();
/* 1359 */             ResponseUtils.setErrorMsgResponse("车辆已入会", response);
/* 1360 */             return;
/*      */           }
/* 1362 */           nResult = saveAfter(lMemberId, validDay, shopId, 
/* 1363 */             groupId, createFileMan, serviceMan, levelID, 
/* 1364 */             greatTime, validDateTmie, true, "");
/*      */         }
/*      */       }
/*      */       else {
/* 1368 */         lMemberId = this.shopMemberDAO.getMemberIdOfGroupIdLicense(groupId, 
/* 1369 */           license);
/* 1370 */         if ((lMemberId == null) || (lMemberId.longValue() <= 0L)) {
/* 1371 */           lMemberId = getMemberIdPtLong(request, response, 
/* 1372 */             sGsonInData, shopId, groupId);
/* 1373 */           if ((lMemberId != null) && (lMemberId.longValue() > 0L) && 
/* 1374 */             (this.dao.insertGsonHeadOneRow(g, lMemberId) > 0))
/* 1375 */             nResult = saveAfter(lMemberId, validDay, shopId, 
/* 1376 */               groupId, createFileMan, serviceMan, 
/* 1377 */               levelID, greatTime, validDateTmie, true, "");
/*      */         }
/*      */         else
/*      */         {
/* 1381 */           existsCustIdShopId = this.shopMemberDAO
/* 1382 */             .isExistsOfGroupIdLicense(groupId, custId);
/* 1383 */           if (existsCustIdShopId) {
/* 1384 */             DbConnection.rollback();
/* 1385 */             ResponseUtils.setErrorMsgResponse("客户已入会", response);
/* 1386 */             return;
/*      */           }
/* 1388 */           nResult = saveAfter(lMemberId, validDay, shopId, 
/* 1389 */             groupId, createFileMan, serviceMan, levelID, 
/* 1390 */             greatTime, validDateTmie, true, "");
/*      */         }
/*      */ 
/*      */       }
/*      */ 
/* 1395 */       if (nResult > 0) {
/* 1396 */         String ssss = RequestUtils.getString(request, "memLogData");
/* 1397 */         this.memberLogDAO.insertMemberLog1(lMemberId, ssss);
/* 1398 */         DbConnection.commit();
/*      */       } else {
/* 1400 */         DbConnection.rollback();
/*      */       }
/* 1402 */       if ((lMemberId == null) || (lMemberId.longValue() <= 0L)) {
/* 1403 */         ResponseUtils.setSqlResultResponse(0, 
/* 1404 */           RequestUtils.getSqlInsertDataErrorMessage(request), 
/* 1405 */           response);
/* 1406 */         return; }
/* 1407 */       ResponseUtils.setResponseResult(lMemberId, response);
/*      */     }
/*      */     catch (Exception e) {
/* 1410 */       DbConnection.rollback();
/* 1411 */       logger.error(e);
/* 1412 */       ResponseUtils.setErrorMsgResponse(
/* 1413 */         RequestUtils.getSqlInsertDataErrorMessage(request) + ":" + 
/* 1414 */         e.getMessage(), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @Transactional
/*      */   @RequestMapping(value={"del"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
/*      */   public void delete(HttpServletRequest request, HttpServletResponse response)
/*      */   {
/* 1425 */     String id = RequestUtils.getStringOfId(request);
/*      */     try {
/* 1427 */       String sData = "id=" + id;
/* 1428 */       String sUrl = "ptmember/del";
/* 1429 */       GsonEbRst rst = HttpGsonPtResponseUtils.postPtEbRst(sUrl, sData, 
/* 1430 */         response);
/* 1431 */       if ((rst != null) && (rst.getState() == 0)) {
/* 1432 */         String[] strParams = id.split(",");
/* 1433 */         int nResult = this.dao.deleteParams(strParams);
/* 1434 */         if (nResult > 0) {
/* 1435 */           this.shopMemberDAO.deleteOfMemberId(strParams);
/* 1436 */           this.memberServiceBillDAO.deleteOfMemberId(strParams);
/* 1437 */           this.memberServiceBillDetailDAO.deleteOfMemberId(strParams);
/* 1438 */           this.memberServiceDetailDAO.deleteOfMemberId(strParams);
/* 1439 */           this.memberLogDAO.deleteOfMemberId(strParams);
/*      */         }
/* 1441 */         DbConnection.commit();
/* 1442 */         ResponseUtils.setSqlResultResponse(nResult, 
/* 1443 */           RequestUtils.getSqlDeleteDataErrorMessage(request), 
/* 1444 */           response);
/*      */       }
/*      */     } catch (Exception e) {
/* 1447 */       DbConnection.rollback();
/* 1448 */       logger.error(e);
/* 1449 */       ResponseUtils.setErrorMsgResponse(
/* 1450 */         RequestUtils.getSqlDeleteDataErrorMessage(request) + ":" + 
/* 1451 */         e.getMessage(), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @Transactional
/*      */   @RequestMapping(value={"edit/shopId/{shopId}"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
/*      */   public void update(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId)
/*      */   {
/* 1468 */     Long id = RequestUtils.getLong(request, "id");
/* 1469 */     String sGsonInData = RequestUtils.getString(request, "data");
/* 1470 */     GsonHeadOneRow gPt = GsonHeadOneRow.jsonStrToObject(sGsonInData);
/* 1471 */     String greatName = UserSessionInfo.getUserNameOfRequest(request);
/* 1472 */     int nResult = 0;
/* 1473 */     Date greatTime = null;
/* 1474 */     Date validDateTmie = null;
/* 1475 */     Integer sta = Integer.valueOf(0);
/*      */     try {
/* 1477 */       String[] delHead = { "OperatorID", "ValidDateTime", 
/* 1478 */         "MemberMemo", "SaleId", "MemberFee", "Modified" };
/* 1479 */       if (gPt.getValueOfName("Status") != null) {
/* 1480 */         sta = ObjectComm.objectToInteger(gPt.getValueOfName("Status"), 
/* 1481 */           Integer.valueOf(0));
/* 1482 */         String status = MemberState.getState(
/* 1483 */           ObjectComm.objectToInteger(gPt.getValueOfName("Status"), Integer.valueOf(0)));
/* 1484 */         if (sta.intValue() == 7) {
/* 1485 */           int isMoney = this.dao.getIsMoneyToNull(id);
/* 1486 */           if (isMoney > 0) {
/* 1487 */             ResponseUtils.setErrorMsgResponse("客户还有" + isMoney + 
/* 1488 */               "预款,不能退卡", response);
/* 1489 */             return;
/*      */           }
/* 1491 */           gPt.autoAddHeadData("CustID", Integer.valueOf(-1));
/* 1492 */           gPt.autoAddHeadData("LevelID", null);
/* 1493 */           gPt.autoAddHeadData("MemberCardNo", null);
/*      */         }
/*      */ 
/* 1496 */         gPt.autoAddHeadData("Status", status);
/*      */       }
/* 1498 */       gPt.delHead(delHead);
/* 1499 */       GsonEbRst rst = null;
/* 1500 */       if (gPt.getDataLength() > 0) {
/* 1501 */         String sData = "data=" + gPt.objectToJsonStr() + 
/* 1502 */           "&" + "id" + "=" + id;
/* 1503 */         String sUrl = "ptmember/edit";
/* 1504 */         rst = 
/* 1505 */           HttpGsonPtResponseUtils.postPtEbRst(sUrl, sData, response);
/*      */       }
/* 1507 */       if ((gPt.getDataLength() <= 0) || ((rst != null) && (rst.getState() == 0))) {
/* 1508 */         GsonHeadOneRow g = GsonHeadOneRow.jsonStrToObject(sGsonInData);
/* 1509 */         if (g == null) {
/* 1510 */           ResponseUtils.setErrorMsgResponse(
/* 1511 */             RequestUtils.getReadJsonDataErrorMessage(request), 
/* 1512 */             response);
/*      */         } else {
/* 1514 */           Long levelId = ObjectComm.objectToLong(
/* 1515 */             g.getValueOfName("LevelID"), Long.valueOf(0L));
/* 1516 */           if (levelId.longValue() <= 0L) {
/* 1517 */             levelId = this.dao.getLevelId(id);
/*      */           }
/* 1519 */           Integer validDay = Integer.valueOf(0);
/*      */ 
/* 1521 */           Integer oldStatus = this.dao.getOldMemberStatus(id);
/* 1522 */           if (oldStatus.intValue() > 0) {
/* 1523 */             Integer curStatus = ObjectComm.objectToInteger(
/* 1524 */               g.getValueOfName("Status"), Integer.valueOf(0));
/* 1525 */             if ((curStatus.intValue() != 2) && (curStatus.intValue() != 0))
/* 1526 */               g.autoAddHeadData("Modified", Integer.valueOf(1));
/*      */           }
/*      */           else {
/* 1529 */             g.autoAddHeadData("Modified", Integer.valueOf(0));
/*      */           }
/* 1531 */           validDay = Integer.valueOf(this.memberLeveldao.getValidDay(shopId, levelId));
/* 1532 */           if (validDay.intValue() <= 0)
/* 1533 */             g.autoAddHeadData("ValidDateTime", 
/* 1534 */               CDateTimeComm.getAddYear(new Date(), 100));
/*      */           else {
/* 1536 */             g.autoAddHeadData("ValidDateTime", 
/* 1537 */               CDateTimeComm.getAddDate(new Date(), validDay.intValue()));
/*      */           }
/* 1539 */           g.autoAddHeadData("CreateFileTime", new Date());
/* 1540 */           g.encryptHead("payPwd");
/* 1541 */           greatTime = (Date)g.getValueOfName("CreateFileTime");
/* 1542 */           validDateTmie = (Date)g.getValueOfName("ValidDateTime");
/* 1543 */           Long userId = 
/* 1544 */             UserSessionInfo.getIntUserIdOfRequest(request);
/* 1545 */           g.autoAddHeadData("OperatorID", userId);
/* 1546 */           if (sta.intValue() == 7) {
/* 1547 */             g.autoAddHeadData("LevelID", null);
/* 1548 */             g.autoAddHeadData("CustID", null);
/* 1549 */             g.autoAddHeadData("MemberCardNo", null);
/* 1550 */             g.autoAddHeadData("License", null);
/*      */           }
/* 1552 */           nResult = this.dao.updateJsonOneRow(g, id);
/* 1553 */           if (nResult > 0) {
/* 1554 */             String serviceMan = this.dao.getserviceMan(id);
/* 1555 */             if ((levelId != null) && (levelId.longValue() > 0L)) {
/* 1556 */               updateResaleAfter(id, validDay, shopId, greatName, 
/* 1557 */                 serviceMan, levelId, greatTime, 
/* 1558 */                 validDateTmie, true);
/*      */             }
/* 1560 */             DbConnection.commit();
/* 1561 */             GsonHeadOneRow r = this.dao.getOneRowOfMemberId(id);
/* 1562 */             if (r != null) {
/* 1563 */               this.memberLogDAO.insertMemberLog2(id, 
/* 1564 */                 RequestUtils.getString(request, "memLogData"), r);
/*      */             }
/*      */ 
/* 1567 */             if (nResult > 0)
/* 1568 */               DbConnection.commit();
/*      */             else {
/* 1570 */               DbConnection.rollback();
/*      */             }
/*      */           }
/*      */ 
/* 1574 */           ResponseUtils.setSqlResultResponse(nResult, 
/* 1575 */             RequestUtils.getSqlUpdateErrorMessage(sGsonInData, request), 
/* 1576 */             response);
/*      */         }
/*      */       }
/*      */     } catch (Exception e) {
/* 1580 */       DbConnection.rollback();
/* 1581 */       logger.error(e);
/* 1582 */       ResponseUtils.setErrorMsgResponse(
/* 1583 */         RequestUtils.getSqlUpdateErrorMessage(sGsonInData, request) + 
/* 1584 */         ":" + e.getMessage(), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @Transactional
/*      */   @RequestMapping(value={"edit/shopId/{shopId}/resale"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
/*      */   public void updateResale(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId)
/*      */   {
/* 1601 */     Long lMemberId = RequestUtils.getLong(request, "id");
/* 1602 */     String sGsonInData = RequestUtils.getString(request, "data");
/* 1603 */     String createFileMan = UserSessionInfo.getUserNameOfRequest(request);
/* 1604 */     String serviceMan = RequestUtils.getString(request, "serviceMan");
/*      */ 
/* 1606 */     GsonHeadOneRow gPt = GsonHeadOneRow.jsonStrToObject(sGsonInData);
/*      */     try {
/* 1608 */       Date greatTime = null;
/* 1609 */       Date validDateTmie = null;
/* 1610 */       String[] delHead = { "OperatorID", "ValidDateTime", 
/* 1611 */         "MemberMemo", "SaleId", "MemberFee", "Modified" };
/* 1612 */       if (gPt.getValueOfName("Status") != null) {
/* 1613 */         String status = MemberState.getState(
/* 1614 */           ObjectComm.objectToInteger(gPt.getValueOfName("Status"), Integer.valueOf(0)));
/* 1615 */         gPt.autoAddHeadData("Status", status);
/*      */       }
/* 1617 */       gPt.delHead(delHead);
/* 1618 */       GsonEbRst rst = null;
/* 1619 */       if (gPt.getDataLength() > 0) {
/* 1620 */         String sData = "data=" + gPt.objectToJsonStr() + 
/* 1621 */           "&" + "id" + "=" + lMemberId;
/* 1622 */         String sUrl = "ptmember/edit";
/* 1623 */         rst = 
/* 1624 */           HttpGsonPtResponseUtils.postPtEbRst(sUrl, sData, response);
/*      */       }
/* 1626 */       if ((gPt.getDataLength() <= 0) || ((rst != null) && (rst.getState() == 0))) {
/* 1627 */         GsonHeadOneRow g = GsonHeadOneRow.jsonStrToObject(sGsonInData);
/* 1628 */         if (g == null) {
/* 1629 */           ResponseUtils.setErrorMsgResponse(
/* 1630 */             RequestUtils.getReadJsonDataErrorMessage(request), 
/* 1631 */             response);
/*      */         } else {
/* 1633 */           Long levelID = ObjectComm.objectToLong(
/* 1634 */             g.getValueOfName("LevelId"), Long.valueOf(0L));
/* 1635 */           Integer validDay = Integer.valueOf(0);
/* 1636 */           if ((levelID != null) && (levelID.longValue() > 0L)) {
/* 1637 */             validDay = Integer.valueOf(this.memberLeveldao.getValidDay(shopId, levelID));
/*      */           }
/*      */ 
/* 1640 */           if (validDay.intValue() <= 0)
/* 1641 */             g.autoAddHeadData("ValidDateTime", 
/* 1642 */               CDateTimeComm.getAddYear(new Date(), 100));
/*      */           else {
/* 1644 */             g.autoAddHeadData("ValidDateTime", 
/* 1645 */               CDateTimeComm.getAddDate(new Date(), validDay.intValue()));
/*      */           }
/* 1647 */           g.autoAddHeadData("CreateFileTime", new Date());
/* 1648 */           g.encryptHead("payPwd");
/* 1649 */           greatTime = (Date)g.getValueOfName("CreateFileTime");
/* 1650 */           validDateTmie = (Date)g.getValueOfName("ValidDateTime");
/*      */ 
/* 1652 */           Integer oldStatus = this.dao.getOldMemberStatus(lMemberId);
/* 1653 */           if (oldStatus.intValue() > 0) {
/* 1654 */             Integer status = ObjectComm.objectToInteger(
/* 1655 */               g.getValueOfName("Status"), Integer.valueOf(0));
/* 1656 */             if ((status.intValue() != 2) && (status.intValue() != 0))
/* 1657 */               g.autoAddHeadData("Modified", Integer.valueOf(1));
/*      */           }
/*      */           else {
/* 1660 */             g.autoAddHeadData("Modified", Integer.valueOf(0));
/*      */           }
/* 1662 */           Long userId = 
/* 1663 */             UserSessionInfo.getIntUserIdOfRequest(request);
/* 1664 */           g.autoAddHeadData("OperatorID", userId);
/* 1665 */           int nResult = this.dao.updateJsonOneRow(g, lMemberId);
/* 1666 */           if (nResult > 0) {
/* 1667 */             nResult = updateResaleAfter(lMemberId, validDay, 
/* 1668 */               shopId, createFileMan, serviceMan, levelID, 
/* 1669 */               greatTime, validDateTmie, true);
/* 1670 */             GsonHeadOneRow r = this.dao.getOneRowOfMemberId(lMemberId);
/* 1671 */             if (r != null) {
/* 1672 */               this.memberLogDAO.insertMemberLog2(lMemberId, 
/* 1673 */                 RequestUtils.getString(request, 
/* 1674 */                 "memLogData"), r);
/*      */             }
/*      */           }
/* 1677 */           ResponseUtils.setSqlResultResponse(nResult, 
/* 1678 */             RequestUtils.getSqlUpdateErrorMessage(sGsonInData, request), 
/* 1679 */             response);
/*      */         }
/* 1681 */         DbConnection.commit();
/*      */       }
/*      */     } catch (Exception e) {
/* 1684 */       DbConnection.rollback();
/* 1685 */       logger.error(e);
/* 1686 */       ResponseUtils.setErrorMsgResponse(
/* 1687 */         RequestUtils.getSqlUpdateErrorMessage(sGsonInData, request) + 
/* 1688 */         ":" + e.getMessage(), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/groupId/normal/{groupId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfGroupId_Normal(HttpServletRequest request, HttpServletResponse response, @PathVariable("groupId") Integer groupId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/* 1704 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/* 1706 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(groupId, null, 
/* 1707 */         Integer.valueOf(2), nPageIdx, nPageSize);
/* 1708 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/* 1710 */       logger.error(e);
/* 1711 */       ResponseUtils.setErrorMsgResponse(
/* 1712 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/groupId/preSale/{groupId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfGroupId_PreSale(HttpServletRequest request, HttpServletResponse response, @PathVariable("groupId") Integer groupId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/* 1728 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/* 1730 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(groupId, null, 
/* 1731 */         Integer.valueOf(1), nPageIdx, nPageSize);
/* 1732 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/* 1734 */       logger.error(e);
/* 1735 */       ResponseUtils.setErrorMsgResponse(
/* 1736 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/shopId/{shopId}/member/opt2/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfMemberOfShopIdOpt2(HttpServletRequest request, HttpServletResponse response, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/* 1751 */     MemberOpt1 m = new MemberOpt1();
/* 1752 */     m.setShopId(RequestUtils.getInt(request, "shopId"));
/* 1753 */     m.setGroupId(RequestUtils.getInt(request, "groupId"));
/* 1754 */     m.setStatus(RequestUtils.getInt(request, "status"));
/* 1755 */     m.setLicense(RequestUtils.getString(request, "license"));
/* 1756 */     m.setCustName(RequestUtils.getString(request, "custName"));
/* 1757 */     m.setLevelId(RequestUtils.getInt(request, "levelId"));
/* 1758 */     m.setMp(RequestUtils.getString(request, "mp"));
/* 1759 */     m.setMemberId(RequestUtils.getString(request, "memberId"));
/* 1760 */     m.setCardNo(RequestUtils.getString(request, "cardNo"));
/* 1761 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/* 1763 */       GsonEbRst gsonEbRst = this.dao.getGsonOfMemberAndAll(
/* 1764 */         m.getMemberMapList(), nPageIdx, nPageSize);
/* 1765 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/* 1767 */       logger.error(e);
/* 1768 */       ResponseUtils.setErrorMsgResponse(
/* 1769 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/groupId/outoff/{groupId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfGroupId_Outoff(HttpServletRequest request, HttpServletResponse response, @PathVariable("groupId") Integer groupId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/* 1785 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/* 1787 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(groupId, null, 
/* 1788 */         Integer.valueOf(7), nPageIdx, nPageSize);
/* 1789 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/* 1791 */       logger.error(e);
/* 1792 */       ResponseUtils.setErrorMsgResponse(
/* 1793 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/groupId/reSale/{groupId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfGroupId_ReSale(HttpServletRequest request, HttpServletResponse response, @PathVariable("groupId") Integer groupId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/* 1809 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/* 1811 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(groupId, null, 
/* 1812 */         Integer.valueOf(3), nPageIdx, nPageSize);
/* 1813 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/* 1815 */       logger.error(e);
/* 1816 */       ResponseUtils.setErrorMsgResponse(
/* 1817 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/groupId/lost/{groupId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfGroupId_Lost(HttpServletRequest request, HttpServletResponse response, @PathVariable("groupId") Integer groupId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/* 1833 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/* 1835 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(groupId, null, 
/* 1836 */         Integer.valueOf(4), nPageIdx, nPageSize);
/* 1837 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/* 1839 */       logger.error(e);
/* 1840 */       ResponseUtils.setErrorMsgResponse(
/* 1841 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/groupId/bad/{groupId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfGroupId_Bad(HttpServletRequest request, HttpServletResponse response, @PathVariable("groupId") Integer groupId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/* 1857 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/* 1859 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(groupId, null, 
/* 1860 */         Integer.valueOf(5), nPageIdx, nPageSize);
/* 1861 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/* 1863 */       logger.error(e);
/* 1864 */       ResponseUtils.setErrorMsgResponse(
/* 1865 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/groupId/upgrade/{groupId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getListOfGroupId_Upgrade(HttpServletRequest request, HttpServletResponse response, @PathVariable("groupId") Integer groupId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*      */   {
/* 1881 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*      */     try {
/* 1883 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndGroupId(groupId, null, 
/* 1884 */         Integer.valueOf(6), nPageIdx, nPageSize);
/* 1885 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (Exception e) {
/* 1887 */       logger.error(e);
/* 1888 */       ResponseUtils.setErrorMsgResponse(
/* 1889 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/int/deposit/memberId/{memberId}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void getIntDepositOfMemberId(HttpServletRequest request, HttpServletResponse response, @PathVariable("memberId") Long memberId)
/*      */   {
/*      */     try
/*      */     {
/* 1907 */       GsonEbRst gsonEbRst = this.dao.getIntDepositOfMemberId(memberId);
/* 1908 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*      */     } catch (SQLException e) {
/* 1910 */       logger.error(e);
/* 1911 */       ResponseUtils.setErrorMsgResponse(
/* 1912 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ 
/*      */   @RequestMapping(value={"find/memberId/payPwd/{memberId}/{pwd}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*      */   public void findPayPwsOfMemberId(HttpServletRequest request, HttpServletResponse response, @PathVariable("memberId") Long memberId, @PathVariable("pwd") String pwd)
/*      */   {
/*      */     try
/*      */     {
/* 1931 */       pwd = AESUtils.getInst().encrypt(pwd);
/* 1932 */       int nReturn = this.dao.queryPayPwd(memberId, pwd);
/* 1933 */       ResponseUtils.setResponseResult(nReturn, response);
/*      */     } catch (SQLException e) {
/* 1935 */       logger.error(e);
/* 1936 */       ResponseUtils.setErrorMsgResponse(
/* 1937 */         RequestUtils.getFindDataErrorMessage(request), response);
/*      */     }
/*      */   }
/*      */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.member.member.controller.MemberController
 * JD-Core Version:    0.5.3
 */